The most basic unit of data transmission in Transmission Control Protocol/Internet Protocol (TCP/IP) or Internet networking is a packet (sometimes referred to as a “datagram”). A packet is a small piece of information coded at a source, marked with the source address (SA), and directed to a destination address (DA). The SA and DA are typically placed in a header of the packet, while data is placed in a payload of the packet. Traditional IP networks and systems rely exclusively on IP addressing to route the packet from one IP network to another, until arriving at the destination address specified in the packet. Routers, switches (such as Ethernet switches), hubs, or other network devices operate to forward packets to their ultimate destination.
A packet can have several headers. For instance, a packet can have a Layer 2 header and a Layer 2 payload. The Layer 2 payload in turn can include a Layer 3 header and a Layer 3 payload. The Layer 3 payload can in turn include a Layer 4 header and a Layer 4 payload, and so on. The Layer 4 payload includes an HTTP header and the HTTP payload. Within the HTTP header, there are several fields whose contents are defined by Request for Comments (RFC) standards. Examples include HTTP header fields having information present in hostname, uniform resource locator (URL), and cookie fields.
For purposes of load balancing network traffic, packets are routed among different servers to ensure that one server does not service all incoming client requests. One technique to load balance is based on the content present in the RFC-defined hostname, URL, and cookie fields of an HTTP header. For example, a packet can be routed to a particular server on the basis of a hostname or host identification (ID) specified in the destination hostname field. As another example, a packet can be directed to a particular server based on a prefix, suffix, or pattern in a URL string of a GET request. As yet another example, cookie switching allows load balancing based on a cookie value, where the cookie value is present as a name value pair in the HTTP header. Accordingly, since the content of these HTTP fields is used for load balancing decisions, this type of routing of packets can be viewed as involving “content switching.”
While use of the information in these three fields does provide load balancing capability, such use is rather primitive and limited in functionality. For instance, the syntax of these rules can be likened to a simple “if-then” statement (e.g., “if the hostname=X, then route the packet to server 1”). The simple structure and primitive evaluation process of these rules is inadequate for use in more complex load balancing scenarios. Moreover, load balancing decisions that are based solely on the information in these three HTTP header fields do not achieve a sufficient or desirable level of network traffic distribution in many environments.